﻿/*******************************************************************************
* Copyright (C) 2006-2011 newportcn
* @author Vincent
*******************************************************************************/
var currentEditor = null;
function imgEditor(img) {
    currentEditor.insertHtml(img);
}
KindEditor.plugin('picformula', function (K) {
    var self = this, name = 'picformula', lang = self.lang(name + '.');
    currentEditor = this;
    self.clickToolbar(name, function () {
        self.focus();
        var width = 1000;
        var height = 600;
        var left, top;
        left = (window.screen.availWidth - width) / 2;
        top = (window.screen.availHeight - height) / 2;
        var per = 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',screenX=' + left + ',screenY=' + top;
        window.open('/Formula/Index', '公式编辑器', per);
    });
});
